ci: Publish snapshot builds to Maven Central#1107
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
|
not opposed to this, but not sure if there's a company-wide rule not to publish snapshots (don't think we do that for any of our repos). Maybe @BYK knows? |
|
@romtsn we do have nightlies for Craft and the new CLI but we don't use the regular publish flow for these |
| ../gradlew publishAllPublicationsToMavenCentralSnapshotsRepository | ||
| -PVERSION_NAME=${{ steps.version.outputs.snapshot_version }} | ||
| env: | ||
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} |
There was a problem hiding this comment.
TIL you can do that with env variables 👀
There was a problem hiding this comment.
yes to answer your question from a gradle side.
from the gihtub secrets perspective, these are just placeholders. i think unfortunately these variables aren't set. i will ask around tomorrow.
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 |
There was a problem hiding this comment.
probably needs to be pinned (and setup-java too), following #1116
romtsn
left a comment
There was a problem hiding this comment.
@runningcode let's do that! I've enabled snapshots for our namespace already
Add a `mavenCentralSnapshots` repository to both plugin-build and sentry-kotlin-compiler-plugin build files, and a new GitHub Actions workflow that publishes `-SNAPSHOT` versions on every push to main. This gives consumers early access to unreleased changes without waiting for a formal release. The snapshot flow is completely independent from the existing craft-based release process. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b4188f1 to
0726767
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Cancelling a running publish can leave the Maven snapshot repository in an inconsistent state (e.g. partial artifacts or mismatched plugin versions between the Gradle Plugin and Kotlin Compiler Plugin). Queuing instead ensures each publish completes atomically. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>

Summary
mavenCentralSnapshotsMaven repository to bothplugin-buildandsentry-kotlin-compiler-pluginbuild files.github/workflows/publish-snapshot.yml) that publishes-SNAPSHOTversions of both plugins on every push tomainPre-requisite
Snapshots must be enabled for the
io.sentrynamespace in the Sonatype Central Portal under Namespaces (one-time manual step).🤖 Generated with Claude Code